package ma.fizazi.missionsmanagement.model;

import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

@Entity
@DiscriminatorValue("Demande")
public class Demande extends Activite {

	private static final long serialVersionUID = 1L;

	@Column
	private Date dateLimite;

	@ManyToOne
	private TypeDemande typeDemande;

	@OneToMany(mappedBy = "demande", cascade = CascadeType.ALL)
	public List<Valeur> valeurs;

	@ManyToOne
	private OrigineBesoin origineBesoin;

	public Demande() {

	}

	public void finalize() throws Throwable {
		super.finalize();
	}

	public Date getDateLimite() {
		return dateLimite;
	}

	public void setDateLimite(Date dateLimite) {
		this.dateLimite = dateLimite;
	}

	public TypeDemande getTypeDemande() {
		return typeDemande;
	}

	public void setTypeDemande(TypeDemande typeDemande) {
		this.typeDemande = typeDemande;
	}

	public List<Valeur> getValeurs() {
		return valeurs;
	}

	public void setValeurs(List<Valeur> valeurs) {
		this.valeurs = valeurs;
	}

	public OrigineBesoin getOrigineBesoin() {
		return origineBesoin;
	}

	public void setOrigineBesoin(OrigineBesoin origineBesoin) {
		this.origineBesoin = origineBesoin;
	}

}